<?php
/**
 * Created by PhpStorm.
 * User: 不死鸟1988
 * Date: 2019/5/27
 * Time: 22:41
 */

namespace app\blog\controller;
use cmf\controller\AdminBaseController;
use think\Db;
use think\db\Query;

class AdminListController extends AdminBaseController
{
    public function index(){

    }

    public function list(){

        $id = trim($this->request->param('id'));
        $orderno = trim($this->request->param('orderno'));

        $user = Db::table('cmf_dai_fu_log')->where(function (Query $query) use ($id,$orderno){
            if (!empty($id)){
                $query->where('id','=',$id);
            }
            if (!empty($orderno)){
                $query->where('orderno','=',$orderno);
            }
        })->order('create_time desc')
            ->paginate(10);

        $list = Db::table('cmf_dai_fu_log')->where(function (Query $query) use ($id ,$orderno){
            if (!empty($id)){
                $query->where('id','=',$id);
            }
            if (!empty($orderno)){
                $query->where('orderno','=',$orderno);
            }
        })->order('create_time desc')
        ->paginate(10);

        $page = $user->render();
        // 获取分页显示

        //$page = $list->render();

        $this->assign('page', $page);
        $this->assign('users',$user);
        return $this->fetch();
    }

    public function content(){
       return $this->fetch('content');
    }

    public function edit(){

        return $this->fetch();
    }

}